<?php

class CategoryController extends Controller{
	
    public function actionNew(){
        $categoryName = trim($_REQUEST['categoryName']);
        if($categoryName == ''){
            $this->renderError('分类名称不能为空');
            return;
        }
        $ret = CategoryService::create($categoryName);
        $this->renderJson($ret);
    }
	
}
